
class Yh {
    public static void main(String[] args) {
        int i, j;
        int[][] a = new int[10][10];

        for (i = 0; i < 10; i++) {
            for (j = 0; j <= i; j++) {
                if (j == 0 || i == j){
                    a[i][j] = 1;
                }else {
                    a[i][j] = a[i - 1][j - 1] + a[i - 1][j];
                }
            }
        }

        for (i = 0; i < 10; i++) {
            for (j = 0; j <= i; j++)
                System.out.print(a[i][j] + " ");
            System.out.println();
        }
    }

}


